Adwaita: combo style cleanup and fixes
authorLapo Calamandrei <calamandrei@gmail.com>
Fri, 15 Jan 2016 23:55:59 +0000 (00:55 +0100)
committerLapo Calamandrei <calamandrei@gmail.com>
Sat, 16 Jan 2016 00:03:08 +0000 (01:03 +0100)
fixes https://bugzilla.gnome.org/show_bug.cgi?id=760524

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index 29435c2707680a6adccae27108c3e888c6c8cb30..3abc5effafef457c0e1ad06c7bdeb51c8e10e37f 100644 (file)
@@ -1051,63 +1051,22 @@ spinbutton {
  * ComboBoxes *
  **************/
 combobox {
-  > button.combo {
-      padding-left: 8px;
-      padding-right: 8px;
-    }
-
-  @include _button_text_shadow;
-
-  &:disabled {
-    color: $insensitive_fg_color;
-    text-shadow: none;
-    -gtk-icon-shadow: none;
-  }
-
-  &:backdrop {
-    color: $backdrop_fg_color;
-    text-shadow: none;
-    -gtk-icon-shadow: none;
-  }
-
-  &:backdrop:disabled { color: $backdrop_insensitive_color; }
-
   arrow {
     -gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
     min-height: 16px;
     min-width: 16px;
   }
 
-  menuitem { text-shadow: none; }
-  > entry.combo {
-    &:dir(ltr) {
-      border-top-right-radius: 0;
-      border-bottom-right-radius: 0;
-    }
-
-    &:dir(rtl) {
-      border-top-left-radius: 0;
-      border-bottom-left-radius: 0;
-    }
-  }
-
-  > button.combo:not(:only-child) {
-    &:dir(ltr) {
-      border-top-left-radius: 0;
-      border-bottom-left-radius: 0;
-      border-left-style: none;
-    }
-
-    &:dir(rtl) {
-      border-top-right-radius: 0;
-      border-bottom-right-radius: 0;
-      border-right-style: none;
+  &.linked {
+    button:nth-child(2) {
+      &:dir(ltr) { @extend %linked:last-child; }
+      &:dir(rtl) { @extend %linked:first-child; }
     }
   }
 }
 
 .linked > combobox > button.combo {
-  // the combo is a composite widget so the way we do button linkind doesn't
+  // the combo is a composite widget so the way we do button linking doesn't
   // work, special case needed. See
   // https://bugzilla.gnome.org/show_bug.cgi?id=733979
 
@@ -1115,9 +1074,9 @@ combobox {
   &:dir(rtl) { @extend %linked_middle; } // specificity bump
 }
 
-.linked > combobox:first-child > button.combo { @extend %linked:first-child; }
-.linked > combobox:last-child > button.combo { @extend %linked:last-child; }
-.linked > combobox:only-child > button.combo { @extend %linked:only-child; }
+.linked:not(.vertical) > combobox:first-child > button.combo { @extend %linked:first-child; }
+.linked:not(.vertical) > combobox:last-child > button.combo { @extend %linked:last-child; }
+.linked:not(.vertical) > combobox:only-child > button.combo { @extend %linked:only-child; }
 
 .linked.vertical > combobox > button.combo { @extend %linked_vertical_middle; }
 .linked.vertical > combobox:first-child > button.combo { @extend %linked_vertical:first-child;}
index 11c50c9d2d3d8182a8ffe66e4464e14533147924..0315dd9852e3e44f89f70ee6c7cc568449f600dd 100644 (file)
@@ -1127,7 +1127,7 @@ searchbar.inline-toolbar toolbutton:backdrop:first-child > button.sidebar-button
 .inline-toolbar headerbar toolbutton:backdrop:first-child > button.titlebutton,
 headerbar .inline-toolbar toolbutton:backdrop:first-child > button.titlebutton,
 .inline-toolbar .titlebar toolbutton:backdrop:first-child > button.titlebutton,
-.titlebar .inline-toolbar toolbutton:backdrop:first-child > button.titlebutton, .linked > combobox:first-child > button.combo {
+.titlebar .inline-toolbar toolbutton:backdrop:first-child > button.titlebutton, combobox.linked button:nth-child(2):dir(rtl), .linked:not(.vertical) > combobox:first-child > button.combo {
   border-top-left-radius: 3px;
   border-bottom-left-radius: 3px; }
 .linked:not(.vertical) > entry:last-child, .linked:not(.vertical) > spinbutton:last-child, .inline-toolbar button:last-child, .linked > button:last-child, headerbar .linked > button.titlebutton:last-child,
@@ -1147,7 +1147,7 @@ searchbar.inline-toolbar toolbutton:backdrop:last-child > button.sidebar-button,
 .inline-toolbar headerbar toolbutton:backdrop:last-child > button.titlebutton,
 headerbar .inline-toolbar toolbutton:backdrop:last-child > button.titlebutton,
 .inline-toolbar .titlebar toolbutton:backdrop:last-child > button.titlebutton,
-.titlebar .inline-toolbar toolbutton:backdrop:last-child > button.titlebutton, .linked > combobox:last-child > button.combo {
+.titlebar .inline-toolbar toolbutton:backdrop:last-child > button.titlebutton, combobox.linked button:nth-child(2):dir(ltr), .linked:not(.vertical) > combobox:last-child > button.combo {
   border-top-right-radius: 3px;
   border-bottom-right-radius: 3px;
   border-right-style: solid; }
@@ -1168,7 +1168,7 @@ searchbar.inline-toolbar toolbutton:backdrop:only-child > button.sidebar-button,
 .inline-toolbar headerbar toolbutton:backdrop:only-child > button.titlebutton,
 headerbar .inline-toolbar toolbutton:backdrop:only-child > button.titlebutton,
 .inline-toolbar .titlebar toolbutton:backdrop:only-child > button.titlebutton,
-.titlebar .inline-toolbar toolbutton:backdrop:only-child > button.titlebutton, .linked > combobox:only-child > button.combo {
+.titlebar .inline-toolbar toolbutton:backdrop:only-child > button.titlebutton, .linked:not(.vertical) > combobox:only-child > button.combo {
   border-radius: 3px;
   border-style: solid; }
 
@@ -1525,45 +1525,10 @@ treeview spinbutton spinbutton:focus {
 /**************
  * ComboBoxes *
  **************/
-combobox {
-  text-shadow: 0 -1px rgba(0, 0, 0, 0.81176);
-  -gtk-icon-shadow: 0 -1px rgba(0, 0, 0, 0.81176); }
-  combobox > button.combo, headerbar combobox > button.combo.titlebutton,
-  .titlebar combobox > button.combo.titlebutton {
-    padding-left: 8px;
-    padding-right: 8px; }
-  combobox:disabled {
-    color: #949796;
-    text-shadow: none;
-    -gtk-icon-shadow: none; }
-  combobox:backdrop {
-    color: #949796;
-    text-shadow: none;
-    -gtk-icon-shadow: none; }
-  combobox:backdrop:disabled {
-    color: #5d6767; }
-  combobox arrow {
-    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
-    min-height: 16px;
-    min-width: 16px; }
-  combobox menuitem {
-    text-shadow: none; }
-  combobox > entry.combo:dir(ltr), combobox > spinbutton.combo:dir(ltr) {
-    border-top-right-radius: 0;
-    border-bottom-right-radius: 0; }
-  combobox > entry.combo:dir(rtl), combobox > spinbutton.combo:dir(rtl) {
-    border-top-left-radius: 0;
-    border-bottom-left-radius: 0; }
-  combobox > button.combo:not(:only-child):dir(ltr), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(ltr),
-  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(ltr) {
-    border-top-left-radius: 0;
-    border-bottom-left-radius: 0;
-    border-left-style: none; }
-  combobox > button.combo:not(:only-child):dir(rtl), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(rtl),
-  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(rtl) {
-    border-top-right-radius: 0;
-    border-bottom-right-radius: 0;
-    border-right-style: none; }
+combobox arrow {
+  -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
+  min-height: 16px;
+  min-width: 16px; }
 
 /************
  * Toolbars *
index cdeda151aafd173da9a906c136461421a552e314..288d73480c8c4ad67f22d845f006ce54a71194bc 100644 (file)
@@ -1127,7 +1127,7 @@ searchbar.inline-toolbar toolbutton:backdrop:first-child > button.sidebar-button
 .inline-toolbar headerbar toolbutton:backdrop:first-child > button.titlebutton,
 headerbar .inline-toolbar toolbutton:backdrop:first-child > button.titlebutton,
 .inline-toolbar .titlebar toolbutton:backdrop:first-child > button.titlebutton,
-.titlebar .inline-toolbar toolbutton:backdrop:first-child > button.titlebutton, .linked > combobox:first-child > button.combo {
+.titlebar .inline-toolbar toolbutton:backdrop:first-child > button.titlebutton, combobox.linked button:nth-child(2):dir(rtl), .linked:not(.vertical) > combobox:first-child > button.combo {
   border-top-left-radius: 3px;
   border-bottom-left-radius: 3px; }
 .linked:not(.vertical) > entry:last-child, .linked:not(.vertical) > spinbutton:last-child, .inline-toolbar button:last-child, .linked > button:last-child, headerbar .linked > button.titlebutton:last-child,
@@ -1147,7 +1147,7 @@ searchbar.inline-toolbar toolbutton:backdrop:last-child > button.sidebar-button,
 .inline-toolbar headerbar toolbutton:backdrop:last-child > button.titlebutton,
 headerbar .inline-toolbar toolbutton:backdrop:last-child > button.titlebutton,
 .inline-toolbar .titlebar toolbutton:backdrop:last-child > button.titlebutton,
-.titlebar .inline-toolbar toolbutton:backdrop:last-child > button.titlebutton, .linked > combobox:last-child > button.combo {
+.titlebar .inline-toolbar toolbutton:backdrop:last-child > button.titlebutton, combobox.linked button:nth-child(2):dir(ltr), .linked:not(.vertical) > combobox:last-child > button.combo {
   border-top-right-radius: 3px;
   border-bottom-right-radius: 3px;
   border-right-style: solid; }
@@ -1168,7 +1168,7 @@ searchbar.inline-toolbar toolbutton:backdrop:only-child > button.sidebar-button,
 .inline-toolbar headerbar toolbutton:backdrop:only-child > button.titlebutton,
 headerbar .inline-toolbar toolbutton:backdrop:only-child > button.titlebutton,
 .inline-toolbar .titlebar toolbutton:backdrop:only-child > button.titlebutton,
-.titlebar .inline-toolbar toolbutton:backdrop:only-child > button.titlebutton, .linked > combobox:only-child > button.combo {
+.titlebar .inline-toolbar toolbutton:backdrop:only-child > button.titlebutton, .linked:not(.vertical) > combobox:only-child > button.combo {
   border-radius: 3px;
   border-style: solid; }
 
@@ -1529,45 +1529,10 @@ treeview spinbutton spinbutton:focus {
 /**************
  * ComboBoxes *
  **************/
-combobox {
-  text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
-  -gtk-icon-shadow: 0 1px rgba(255, 255, 255, 0.76923); }
-  combobox > button.combo, headerbar combobox > button.combo.titlebutton,
-  .titlebar combobox > button.combo.titlebutton {
-    padding-left: 8px;
-    padding-right: 8px; }
-  combobox:disabled {
-    color: #8b8e8f;
-    text-shadow: none;
-    -gtk-icon-shadow: none; }
-  combobox:backdrop {
-    color: #8b8e8f;
-    text-shadow: none;
-    -gtk-icon-shadow: none; }
-  combobox:backdrop:disabled {
-    color: #c3c3c0; }
-  combobox arrow {
-    -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
-    min-height: 16px;
-    min-width: 16px; }
-  combobox menuitem {
-    text-shadow: none; }
-  combobox > entry.combo:dir(ltr), combobox > spinbutton.combo:dir(ltr) {
-    border-top-right-radius: 0;
-    border-bottom-right-radius: 0; }
-  combobox > entry.combo:dir(rtl), combobox > spinbutton.combo:dir(rtl) {
-    border-top-left-radius: 0;
-    border-bottom-left-radius: 0; }
-  combobox > button.combo:not(:only-child):dir(ltr), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(ltr),
-  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(ltr) {
-    border-top-left-radius: 0;
-    border-bottom-left-radius: 0;
-    border-left-style: none; }
-  combobox > button.combo:not(:only-child):dir(rtl), headerbar combobox > button.combo.titlebutton:not(:only-child):dir(rtl),
-  .titlebar combobox > button.combo.titlebutton:not(:only-child):dir(rtl) {
-    border-top-right-radius: 0;
-    border-bottom-right-radius: 0;
-    border-right-style: none; }
+combobox arrow {
+  -gtk-icon-source: -gtk-icontheme("pan-down-symbolic");
+  min-height: 16px;
+  min-width: 16px; }
 
 /************
  * Toolbars *